Skip to content

Conversation

@saifsultanc
Copy link
Contributor

Context

⛑️ Ticket(s): https://secure.helpscout.net/conversation/2840306289/77678

Summary

Cache Buster is causing fatal error when the following filter is used with GF Gutenberg Blocks.
add_filter( 'gfcb_enable_cache_buster', '__return_true' );

Following fatal error occurs:
PHP Fatal error: Uncaught TypeError: json_decode(): Argument #1 ($json) must be of type string, array given in ...

Add an additional check to the logic to ensure json_decode is not processed on a value that is already correctly set in the array form. For further context, here is a debug snapshot of the values at this code line on a simple gravity forms block:
Screenshot 2025-02-06 at 12 14 52 AM

@saifsultanc saifsultanc added the bug Something isn't working label Feb 5, 2025
@saifsultanc saifsultanc merged commit 0a7df65 into master Feb 6, 2025
3 of 4 checks passed
@saifsultanc saifsultanc deleted the saif/fix/77678-fix-fatal-error-gfcb branch February 6, 2025 05:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Development

Successfully merging this pull request may close these issues.

3 participants